package com.ebocy.hammer.battle.fight.message;

import com.ebocy.hammer.core.constants.GameMessageCode;
import com.ebocy.hammer.core.message.AbstractS2CMessage;

public class S2CDropItemMessage extends AbstractS2CMessage {
	String playerId;
	int uuid;
	int itemId;
	short x;
	short y;

	public S2CDropItemMessage(long playerId,int uuid, int itemId,int x, int y) {
		this.playerId = String.valueOf(playerId);
		this.uuid=uuid;
		this.itemId=itemId;
		this.x = (short)x;
		this.y = (short)y;
	}

	@Override
	protected void writeMessage() {
		writeString(playerId);
		writeInt(uuid);
		writeInt(itemId);
		writeShort(x);
		writeShort(y);
	}

	@Override
	public short getMessageCode() {
		return GameMessageCode.BATTLE_DROP_ITEM;
	}

}
